<?php
/**
* VirtueMart Advanced Search Module By Sharif Mamdouh
*
* www.inowweb.com
*/

defined('_JEXEC') or die('Restricted access');

$moduleclass_sfx = $params->get('moduleclass_sfx');


?>
<!--BEGIN Search Box --> 

<div class="virtuemart_advsearch<?php echo $moduleclass_sfx?>">
                              <span class="isearch"></span>
                              <?php
									$url = & JURI::getInstance();
 									$db = & JFactory::getDBO();
									$query = "SELECT `c`.`category_name` AS `name` , `c`.`category_id` AS `id` FROM `#__vm_category` AS `c` ORDER BY `c`.`category_id`;";
									$db->setQuery($query);
									$categoriesListt = $db->loadObjectList();
								?>
                              <form name="adv_search" method="post" action="<?php echo $url->root(); ?>">
                                    <input type="hidden" value="shop.browse" name="page"/>
                                    <input type="hidden" value="com_virtuemart" name="option"/>
                                    <input type="hidden" value="9999" name="Itemid"/>
                                    <input type="text" size="20" name="keyword1" class="inputbox"/>
                                    <select name="search_op" class="styled_short">
                                          <option value="and">AND</option>
                                          <option value="and not">NOT</option>
                                    </select>
                                    <input type="text" size="20" name="keyword2" class="inputbox"/>
                                    <select name="search_category" class="styled_long" style="width:140px">
                                          <option value="0">Search All Categories</option>
                                          <?php foreach($categoriesListt as $row) : ?>
                                          <option value="<?php echo $row->id; ?>"><?php echo $row->name; ?></option>
                                          <?php endforeach; ?>
                                    </select>
                                    <select name="search_limiter" class="styled_long">
                                          <option value="anywhere">Search all product info</option>
                                          <option value="name">Product name only</option>
                                          <option value="cp">Manufacturer/Vendor only</option>
                                          <option value="desc">Product description only</option>
                                    </select>
                                    <input type="submit" value="<?php echo JText::_("SEARCH"); ?>" name="search" class="button search"/>
                              </form>
							  
							 <div align="right" style="color:#999;margin-bottom:3px;font-size:9px">By i<a target="_blank" class="external" title="web design company" href="http://www.inowweb.com"><span style="color:#999;margin-bottom:3px;font-size:9px" >Web Design</span></a></div>
							  
                        </div>
<!-- End Search Box --> 